/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.grnt.buddy;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import org.grnt.buddy.BuddiesTreeInit.BuddiesInitException;
import org.grnt.dbcommon.DataControler.DataControlException;

/**
 * This is a servlet witch be instanced automatic for init buddies tree. It uses
 * the object of BuddiesTreeInit class for that.
 * @author sayid
 */
public class BuddiesTreeInitSlt extends HttpServlet {
	/**
	 *
	 * @throws ServletException
	 */
	@Override
	public void init() throws ServletException {
		super.init();
		try {
			BuddiesTreeInit.init();
		} catch (BuddiesInitException ex) {
			Logger.getLogger(BuddiesTreeInitSlt.class.getName()).log(Level.SEVERE, null, ex);
			throw new ServletException(ex);
		} catch (DataControlException ex) {
			Logger.getLogger(BuddiesTreeInitSlt.class.getName()).log(Level.SEVERE, null, ex);
			throw new ServletException(ex);
		}
	}
	
}
